<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/common/topBegin.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/Validform.css"/>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/right_yz.css"/>
 <script type="text/javascript" src="${ctx}/js/jquery-1.7.1.min.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/Validform_v5.3.2.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/right_Validform_v5.3.2_config.js"></script>
 <script type="text/javascript" src="${ctx}/js/ajaxfileupload.js"></script>
 <script type="text/javascript" src="${ctx}/js/extjs/ext-base.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ext-all.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ui/ext-ui.js"></script>
<script type="text/javascript" src="${ctx}/js/public/console.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ux/Toast.js"></script>
<script>
var cfg = {cxt:'${ctx}'};
<c:if test="${not empty entity}">
	<c:set var="url" value="car/update.action"/>
</c:if>
<c:if test="${ empty entity}">
<c:set var="url" value="car/add.action"/>
</c:if>
var companyId="${currentUser.person.companyId}";
</script>
</head>
<body>
<div  id="table_form_div" class="table_form1">
<form  action="${ctx}/${url}" method="post" id="formobj" enctype="multipart/form-data">
 <input type="hidden" id="subBtn"   />
 <input type="hidden" id="backTip"  value="操作成功" />
  <table class="table-form" width="100%">
   <tbody>
     <tr>
	 	<td width="10%" class="table-th">车牌号<font color="red">*</font></td>
	    <td class="table-td"  colspan="3">
            <input type="text" id="licenseNum"  class="input-text" style="width:90%;" name="licenseNum" value="${entity.licenseNum}" maxlength="7"   datatype="*" />
	    <td  width="10%" class="table-th">车牌颜色<font color="red">*</font></td>
        <td class="table-td"  colspan="3">
     		<span style="margin:15px;">
	           	<input type="radio" name="licenseColor" id="licenseColor1" value="1" <c:if test="${entity.licenseColor==1||empty entity.licenseColor }">checked</c:if>  />  黄色
	          	</span>
	          	<span style="margin:15px;">
	           <input type="radio" name="licenseColor" id="licenseColor2" value="2" <c:if test="${entity.licenseColor==2 }">checked</c:if>  >  蓝色
          	</span>
       	</td>
	  </tr>
	  <tr>
	  	<td  width="10%" class="table-th">挂车牌号</td>
         　	<td class="table-td" colspan="3">
        	<input type="text" id="licenseNum2"  class="input-text" style="width:90%;" name="licenseNum2" value="${entity.licenseNum2}" maxlength="7"    />
	    </td>
    　
        <td  width="10%" class="table-th">车辆颜色</td>
         　	<td class="table-td" colspan="3">
           <input type="text" id="Color"  class="input-text" style="width:90%;" name="carColor" value="${entity.carColor}" maxlength="5"    />
	    </td>
    　	 </tr>
	<tr>
	   	<td  width="10%" class="table-th">车辆类型</td>
	    <td class="table-td"  colspan="3"> 
       		<select name="carCategory.id" >
       			<c:forEach var="item" items="${carCategoryList }">
	       				<option value="${item.id }" <c:if test="${item.id eq entity.carCategory.id }"> selected="selected" </c:if>  >
	       					${item.name }
	       				</option>
	       			</c:forEach>
	       		</select>
       </td>
	   <td  width="10%" class="table-th">车辆长、宽、高(MM)</td>
         　 <td class="table-td" width="15%">
	   		<input type="text" id="lengthSize"  class="input-text" style="width:90%;" name="lengthSize" value="${entity.lengthSize}" maxlength="5" datatype="n"  ignore="ignore"   />
	   </td>
	   <td class="table-td" width="15%">
	   		<input type="text" id="lengthSize"  class="input-text" style="width:90%;" name="widthSize" value="${entity.widthSize}" maxlength="5" datatype="n" ignore="ignore"   />
	   </td>
	   <td class="table-td" width="15%">
	   		<input type="text" id="lengthSize"  class="input-text" style="width:90%;" name="highSize" value="${entity.highSize}" maxlength="5" datatype="n" ignore="ignore"   />
	   </td>
	</tr>
	
	<tr>
	  <td  width="10%" class="table-th">核定载重（Kg）<font color="red">*</font></td>
        　	 　<td class="table-td" width="10%">
           <input type="text" id="carryCapacity"  class="input-text" style="width:90%;" name="carryCapacity" value="${entity.carryCapacity}" datatype="floatNumTwo"/>
       </td>
   　			
   	 <td  width="10%" class="table-th">整备质量（Kg）<font color="red">*</font></td>
        　	 <td class="table-td" width="10%">
           <input type="text" id="curbWeight"  class="input-text" style="width:90%;" name="curbWeight" value="${entity.curbWeight}" datatype="floatNumTwo"/>
     </td>
	 <td  width="10%" class="table-th">准牵引总质量或挂车总质量（Kg）<font color="red">*</font></td>
     　  <td class="table-td" colspan="3">
	     <input type="text" id="ttMass"  class="input-text" style="width:90%;" name="ttMass" value="${entity.ttMass}" datatype="floatNumTwo"/>
	  </td>
　	</tr>
    <tr>
   	 <td width="10%" class="table-th">企业名称<font color="red">*</font></td>
	 <td class="table-td" colspan="3">
      	<input type="hidden" id="hid_companyId" name="company.id" value="${entity.company.id }" />
        <input type="hidden" id="hid_companyName"   value="${entity.company.name }" />
       	<span id="sp_company"/>
	 </td>
   	 <td  width="10%" class="table-th">持有类型</td>
     <td class="table-td"  colspan="3"> 
   		<select name="carType">
   			<option value="1"　<c:if test="${entity.carType ==1}"> selected="selected" </c:if>>自有 </option>
   			<option value="2" <c:if test="${entity.carType ==2}"> selected="selected" </c:if>>挂靠 </option>
   			<option value="3" <c:if test="${entity.carType ==3}"> selected="selected" </c:if> >社会 </option>
   		</select>		    	   		 
	 </td>
	</tr>
   <tr>
	  	<td width="10%" class="table-th">道路运输证号码<font color="red">*</font></td>
	    <td class="table-td" colspan="3">
	      <input type="text" class="input-text" style="width:90%;" name="transLicenseNum"  value="${entity.transLicenseNum }" datatype="*"/>
	    </td>
	     
	    <td width="10%" class="table-th">经营范围<font color="red">*</font></td>
	    <td class="table-td" colspan="3">
	      <input type="text" class="input-text" style="width:98%;height:30px;" name="bussinessScope"  value="${entity.bussinessScope }" datatype="*"/>
	    </td>
    </tr>
    <tr>
    	
    </tr>
    <tr>
     <td width="10%" class="table-th">交强险有效期</td>
     <td class="table-td"  colspan="3">
      <span id="forcedInsuranceTime" ></span>
         <input type="hidden" id="hid_forcedInsuranceTime" value="${entity.forcedInsuranceTime}"/>
        </td>
       	  <td width="10%" class="table-th">第三者责任险有效期</td>
     <td class="table-td"  colspan="3">
      <span id="thirdInsuranceTime" ></span>
         <input type="hidden" id="hid_thirdInsuranceTime" value="${entity.thirdInsuranceTime}"/>
        </td>
    </tr>
    <tr>
        <td width="10%" class="table-th">承运人责任险有效期</td>
     	<td class="table-td"  colspan="3">
      		<span id="carrierInsuranceTime" ></span>
         	<input type="hidden" id="hid_carrierInsuranceTime" value="${entity.carrierInsuranceTime}"/>
       	</td>
        <td width="10%" class="table-th">卫星定位系统营运商</td>
		<td class="table-td" colspan="3">
	      	<input type="text" class="input-text" style="width:90%;" name="satelliteSupplier"  value="${entity.satelliteSupplier }" />
	    </td>
	</tr>
	<tr>
		<td width="10%" class="table-th">道路运输证年审有效期</td>
		<td class="table-td"  width="15%">
	      <span id="transLicenseExamTime" ></span>
          <input type="hidden" id="hid_transLicenseExamTime" value="${entity.transLicenseExamTime}"/>
	    </td>
		<td width="10%" class="table-th">证件有效期</td>
		<td class="table-td"  width="15%">
	      <span id="sp_transLicenseValidityTime" ></span>
          <input type="hidden" id="hid_transLicenseValidityTime" value="${entity.transLicenseValidityTime}"/>
	    </td>
        <td width="10%" class="table-th">行驶证年审有效期</td>
     	<td class="table-td"  width="15%">
      		<span id="driveExamTime" ></span>
         	<input type="hidden" id="hid_driveExamTime" value="${entity.driveExamTime}"/>
        </td>
         <td width="10%" class="table-th">证件有效期</td>
     	<td class="table-td"  width="15%">
      		<span id="sp_driveValidityTime" ></span>
         	<input type="hidden" id="hid_driveValidityTime" value="${entity.driveValidityTime}"/>
        </td>
    </tr>
    <tr>
		<td width="10%" class="table-th">罐体年检有效期</td>
      	<td class="table-td"  colspan="3">
	      <span id="tankExamTime" ></span>
          <input type="hidden" id="hid_tankExamTime" value="${entity.tankExamTime}"/>
        </td>
        <td width="10%" class="table-th">罐体容积(M³)</td>
        <td class="table-td"  width="15%">
        	<input type="text" id="tank_volume" value="${entity.tankVolume}" datatype="floatNumTwo" maxlength="10" ignore="ignore"/>
        </td>
        <td width="10%" class="table-th">罐体材质</td>
        <td class="table-td"  width="15%">
        	<input type="text" id="tank_material" value="${entity.tankMaterial}" maxlength="20" />
        </td>
	</tr>
	<tr>
         <td width="10%" class="table-th">技术等级评定有效期</td>
      	 <td class="table-td"  colspan="3">
	      <span id="techicalGradeTime" ></span>
          <input type="hidden" id="hid_techicalGradeTime" value="${entity.techicalGradeTime}"/>
         </td>
         <td width="10%" class="table-th">二级维护有效期</td>
      	 <td class="table-td" colspan="3">
	      <span id="secondMaintenanceTime" ></span>
          <input type="hidden" id="hid_secondMaintenanceTime" value="${entity.secondMaintenanceTime}"/>
         </td>
     </tr>
      <tr>
       <td  width="10%" class="table-th">
       		<span id="type1">驾驶员</span><font color="red">*</font>
       	</td>
       <td class="table-td" colspan="3">
       		<input type="hidden" id="hid_driverId" name="driver.id" value="${entity.driver.id}" />
   			<input type="hidden" id="hid_driver"   value="${entity.driver.name}" />
       		<span id="sp_driver" ></span>
       </td>
       <td  width="10%" class="table-th">
       		<span id="type1">押运员</span><font color="red">*</font>
       	</td>
       <td class="table-td"  colspan="3">
       	<input type="hidden" id="hid_escrotId" name="escort.id" value="${entity.escort.id}" />
  		<input type="hidden" id="hid_escort" value="${entity.escort.name}" />
      	<span id="sp_escort" ></span>	
       </td>
   </tr>
   <tr>
  	 <td  width="10%" class="table-th">驾驶证号</td>
  	 <td class="table-td"  width="15%">
  	 	<input type="text" id="driver_driverLiceseNum" class="input-text" style="width: 90%;" value="${driver.driverLiceseNum}"  readonly="readonly" />
	</td>
	<td  width="10%" class="table-th">证件有效期</td>
	<td width="15%" class="table_td">
		<input type="text" id="driver_driverLiceNum_validity" class="input-text" style="width: 90%;" value="<fmt:formatDate value='${driver.driverLiceseNumValidity}' pattern="yyyy-MM-dd"/>"  readonly="readonly" />
	</td>
	<td width="10%" class="table-th">从业资格证号</td>							
	<td class="table-td" width="15%">						
		<input type="text"	 id="escort_superCargoNum" class="input-text"	style="width: 90%;" value="${escort.superCargoNum}"  readonly="readonly" />				
	</td>
	<td  width="10%" class="table-th">证件有效期</td>
	<td width="15%" class="table_td">
		<input type="text"	 id="escort_superCargoNum_validity" class="input-text"	style="width: 90%;" value='<fmt:formatDate value="${escort.superCargoNumValidity}" pattern="yyyy-MM-dd"/>'  readonly="readonly" />			
	</td>			
  </tr>
  <tr>
    	<td  width="10%" class="table-th">联系电话</td>
    	 <td class="table-td"  colspan="3">
    		<input type="text" id="driver_contractPhone" 　  class="input-text" style="width: 90%;" value="${driver.contractPhone}" readonly="readonly" />
    	</td>
    	<td  width="10%" class="table-th">联系电话</td>
    	 <td class="table-td"  colspan="3">
    		<input type="text" id="escort_contractPhone" 　  class="input-text" style="width: 90%;" value="${escort.contractPhone}" readonly="readonly" />
    	</td>
  </tr>
	    <tr rowspan="5">
	    	<td width="10%" class="table-th">个人照片</td>
	    	<td class="table-td"  colspan="3" align="center">
	    		 <c:choose>
					<c:when test="${not empty driver.photo }">
						<img id="driver_photo" src="${ctx}/upload/${driver.photo}"
							style="width: 90%; height:auto;" />
					</c:when>
					<c:otherwise>
						<img id="driver_photo" src="${ctx}/images/organ/nophoto.gif"
							style="width: 90%; height: 250px;;" />
					</c:otherwise>
				</c:choose>
	    	</td>
	    	<td width="10%" class="table-th">个人照片</td>
	    	<td class="table-td"  colspan="3" align="center">
	    		  <c:choose>
					<c:when test="${not empty escort.photo }">
						<img id="escort_photo" src="${ctx}/upload/${escort.photo}"
							style="width: 90%; height: auto;" />
					</c:when>
					<c:otherwise>
						<img id="escort_photo" src="${ctx}/images/organ/nophoto.gif"
							style="width: 90%; height:250px;;" />
					</c:otherwise>
				</c:choose>
	    	</td>
	    </tr>
	     <tr>
	      <td width="10%" class="table-th">备注</td>
		       <td class="table-td" colspan="7">
		           <textArea id="remark"  class="textarea" style="width:98%;" cols="75" rows="3" name="remark"  maxlength="100" >${entity.remark }</textArea>
		       </td>
	     </tr>
	</tbody>
 </table>
	   <input type="hidden" id="id"  name="id" value="${entity.id}" />
	  </form>
	  </div>
	  <script type="text/javascript" src="${ctx}/js/app-web/biz/car/carForm.js"></script>
	  </body>
	  </html>
	  